package acm.pta5;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class T1_1 {
    public static void main(String[] args) throws IOException {
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        String read[] = in.readLine().split(" ");
        for (int i = 0; i < read.length; i++) {
            if (read[i].equals("250")) {
                System.out.println(++i);
                break;
            }
        }
    }
}

